<?php

namespace app\controller\v1\api;

use app\BaseController;
use app\common\Send;
use app\utils\TaskOrderEmun;
use think\App;
use think\Request;
use app\service\TaskOrderService;
class TaskOrder extends BaseController
{
    use Send;

    protected $taskOrderService;

    public function __construct(App $app, TaskOrderService $taskOrderService)
    {
        parent::__construct($app);
        $this->taskOrderService = $taskOrderService;
    }

    public function index(Request $request)
    {
        $params = $request->param();
        $result = $this->taskOrderService->apiList($params);
        return self::success($result);
    }

    public function save(Request $request)
    {
        $params = $request->param();
        $result = $this->taskOrderService->save($params);
        return self::success($result);
    }

    public function status()
    {
        return self::success(TaskOrderEmun::taskOrderStatusText());
    }

}
